//base
import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
//less
import './index.less'

class CompanyIntroDetail extends Component {
  componentWillMount() {
    //onLoad
  }

  componentDidMount() {
    //onready
  }

  componentDidShow() {
    //onshow
  }

  componentDidHide() {
    //onhide
  }

  componentWillUnmount() {
    //onUnload
  }

  delay(time = 0) {
    return new Promise(resolve => {
      setTimeout(() => {
        resolve()
      }, time)
    })
  }

  render() {
    const { companyintro } = this.props
    const companyintroarr = (companyintro && companyintro.split('\n')) || []
    return (
      <View className={`CompanyIntroDetail_id53997 ${this.props.visible == 0 ? '' : 'hide'}`}>
        <View className="cpdetailwrap">
          <View className="detailtext">
            {companyintroarr.map(data => {
              return <View>{data}</View>
            })}
          </View>
        </View>
        <View className="cpdetailwrap">
          <View className="titleinfo">公司地址</View>
          <View className="areawrap">
            <View className="cptext">{this.props.companyaddress.addressname}</View>
            <Image
              className="detailimg"
              src="https://imagesize.hrwork.com/sp/files/f50ddc08-4eb8-4326-89f0-85a6d1b1807b.png"
            />
          </View>
        </View>
        {/*<View className="cpdetailwrap">*/}
        {/*<View className="titleinfo">工商信息</View>*/}
        {/*{this.props.iacmessage.list.map(() => {*/}
        {/*return (*/}
        {/*<View className="gslist">*/}
        {/*<View className="gslabel">成立时间</View>*/}
        {/*<View className="gscntx">2012年12月27日</View>*/}
        {/*</View>*/}
        {/*)*/}
        {/*})}*/}
        {/*<View className="datafrom">*/}
        {/*<View className="fromlabel">数据来源：</View>*/}
        {/*<View className="fromcntx">天眼查</View>*/}
        {/*<View className="frommore">查看更多</View>*/}
        {/*</View>*/}
        {/*</View>*/}
      </View>
    )
  }
}

export default CompanyIntroDetail
